package com.goldenlight.fvms.manager.entity;

import cn.afterturn.easypoi.excel.annotation.Excel;
import cn.afterturn.easypoi.excel.annotation.ExcelTarget;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Date;

/**
 * <p>
 * 员工通行车辆申请信息表
 * </p>
 *
 * @author luocx
 * @since 2018-12-09
 */
@ExcelTarget("employFreeEntity")
@TableName("tb_employ_free_apply")
@Data
public class EmployFreeApply implements Serializable {

    private static final long serialVersionUID = 1L;
    @Excel(name = "序号", height = 20, width = 30, isImportField = "applyId")
    @TableId(value = "APPLY_ID", type = IdType.AUTO)
    private Long applyId;

    /**
     * 车牌号
     */
    @Excel(name = "车牌号", height = 20, width = 30, isImportField = "carNum")
    @TableField("CAR_NUM")
    private String carNum;

    /**
     * 厂牌
     */
    @Excel(name = "厂牌", height = 20, width = 30, isImportField = "carLabel")
    @TableField("CAR_LABEL")
    private String carLabel;

    /**
     * 车牌颜色
     */
    @Excel(name = "车牌颜色", height = 20, width = 30, isImportField = "carColor")
    @TableField("CAR_COLOR")
    private String carColor;

    /**
     * 车型（收费车型）
     */
    @Excel(name = "车型（收费车型）", height = 20, width = 30, isImportField = "carModel")
    @TableField("CAR_MODEL")
    private String carModel;

    /**
     * 申请人单位
     */
    @Excel(name = "申请人单位", height = 20, width = 30, isImportField = "applicantUnit")
    @TableField("APPLICANT_UNIT")
    private String applicantUnit;

    /**
     * 申请人姓名
     */
    @Excel(name = "申请人姓名", height = 20, width = 30, isImportField = "applicantName")
    @TableField("APPLICANT_NAME")
    private String applicantName;

    /**
     * 行驶本登记
     */
    @Excel(name = "行驶本登记单位", height = 20, width = 30, isImportField = "carDriveRegist")
    @TableField("CAR_DRIVE_REGIST")
    private String carDriveRegist;

    /**
     * 固定通行站点
     */
    @Excel(name = "固定通行站点", height = 20, width = 30, isImportField = "carFixedSite")
    @TableField("CAR_FIXED_SITE")
    private String carFixedSite;

    /**
     * 可选通行站点
     */
    @Excel(name = "可选通行站点", height = 20, width = 30, isImportField = "carChooseSite")
    @TableField("CAR_CHOOSE_SITE")
    private String carChooseSite;

    /**
     * 业务类型
     */
    @Excel(name = "业务类型", height = 20, width = 30, isImportField = "carBussType")
    @TableField("CAR_BUSS_TYPE")
    private String carBussType;

    /**
     * 备注
     */
    @Excel(name = "备注", height = 20, width = 30, isImportField = "carNote")
    @TableField("CAR_NOTE")
    private String carNote;
    /**
     * 时间戳
     */
    @TableField("TIME_STAMP")
//    @JsonFormat(timezone = "GMT+8", pattern = "yyyyMMddHHmmss")
    private Date timeStamp;
    /**
     * 内部版本号
     */
    @TableField("BUILD_VERSION")
    private String buildVersion;

    /**
     * 条数
     * 汇总查询用
     */
    @TableField(value="count",exist = false)
    private Integer count;

    public String getCondition() {
        return this.getCarNum() + "-" + this.getApplicantName();
    }

    public String getJudeCondition() {
        return this.getCarNum() + "-" + this.getApplicantName() + "-" + this.getCarBussType();
    }

}
